package homework.test6;

import java.util.LinkedList;

/*
LinkedList类存储字符串对象并遍历
 */
public class Demo6 {
    public static void main(String[] args) {
        LinkedList<String> list = new LinkedList<>();

        list.add("a");
        list.add("b");
        list.add("c");
        list.add("d");

        for (String s : list) {
            System.out.println(s);
        }
    }
}
